1. Field of the Invention
The invention relates generally to a storage apparatus and a data storage method using the same, and more particularly to a storage technique for compressing and efficiently storing write data under RAID control.
2. Description of Related Art
A technique is known in which data is compressed and stored for effectively utilizing limited storage resources in a storage apparatus. In the arrangement in which data is compressed and then stored, the size of compressed data is not fixed and greatly depends on the content of data before the compression.
Reference 1 (JP 5-189157 A) discloses a storage apparatus that stores, when data is compressed and stored in a disk drive, a portion of the compressed data that cannot be stored in a predetermined storage area in an overflow storage area. Specifically, in reference 1, when data from a main processing apparatus is written in a disk drive, this data is compressed by a compression unit, where judgment is made as to whether or not the compressed data can be stored in a relevant block in a fixed size storage area in the disk drive based on the address. If it is determined that the compressed data cannot be stored in the relevant block, a portion of this compressed data is stored in the relevant block and the remaining portion is stored in the overflow storage area.
Recently, storage apparatuses using RAID (Redundant Arrays of Independent Disks) technology have been becoming mainstream due to their large capacity and high reliability. In RAID, a RAID level (i.e., RAID 0 to RAID 6) is defined in accordance with the configuration of a hard disk drive. For example, the RAID 1 level involves a manner (mirroring) in which plural pieces of data having the same content are simultaneously written to plural hard disk drives, and the RAID 5 level involves a manner in which a block unit of data is distributed and written to plural hard disks with error correcting code data (parity data).
Of such RAID configurations, RAID 5 is popular because its general performance is great in practical use. As described above, parity data is used in RAID 5 in light of fault tolerance, so when write data is compressed and stored, the parity data is also compressed and stored. In general, the randomness of data bits of parity data is typically higher than that of write data, and high compression efficiency cannot be expected. For this reason, it is highly probable that data overflow resulting from low compression efficiency will constantly occur, and that the conventionally prepared overflow storage area might be used up quickly. Also, if an overflow storage area with a sufficient size is prepared from the start, the running costs increase, which is not economic.